﻿using System.Runtime.Serialization;

namespace AgNet.Models
{
    /// <summary>
    /// Represents a user session. 
    /// Can be stored and remains valid until the user revokes authorization for your application or the Access token expires.
    /// </summary>
    [DataContract]
    public class AgSession
    {
        /// <summary>
        /// Gets the access token.
        /// </summary>
        [DataMember]
        public string AccessToken { get; private set; }

        /// <summary>
        /// Gets the expiration time of the access token in seconds.
        /// </summary>
        [DataMember]
        public int ExpiresIn { get; private set; }

        /// <summary>
        /// Gets the refresh token.
        /// </summary>
        [DataMember]
        public string RefreshToken { get; private set; }
    }
}
